package com.mnsq.subject.bean.condition;

import com.mnsq.common.bean.annotation.JpaFields;
import com.mnsq.subject.bean.base.BaseCondition;
import com.mnsq.subject.bean.entity.Subject;
import com.mnsq.subject.bean.enums.SubjectType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author Administrator
 * @date 2019/3/17 0017
 */
@Data
@Accessors(chain = true)
public class SubjectCondition extends BaseCondition<Subject> {
    private Long id;
    /**
     * @see SubjectType
     */
    @JpaFields(fieldName = "type", attrType = JpaFields.AttrType.EQ)
    private Integer type;
    private String title;
    private String authorName;
    @ApiModelProperty(hidden = true)
    private Integer status = 1;

    @Override
    @ApiModelProperty(hidden = true)
    public Subject getInstance() {
        return new Subject();
    }

    @Override
    public boolean isEmpty() {
        return false;
    }
}
